package com.zyuan.lawyerport.view.dModule.activity;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.zyuan.lawyerport.R;
import com.zyuan.lawyerport.view.dModule.adapter.CommonProblemAdapter;
import com.zyuan.lawyerport.view.dModule.bean.CommonProblemBean;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import common.base.activity.BaseActivity;

/**
 * 作者 ：RAN
 * 时间 ：2019/10/15 16:31
 * 类名 ：CommonProblemActivity
 * 描述 ：常见问题
 * 版本 ：1.0
 */
public class CommonProblemActivity extends BaseActivity {
    @BindView(R.id.common_recy_view)
    RecyclerView mRecyclerView;
    @BindView(R.id.img_back)
    ImageView imgBack;
    @BindView(R.id.tv_l)
    TextView tvL;
    @BindView(R.id.ll_back)
    LinearLayout llBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_r)
    ImageView ivR;
    @BindView(R.id.tv_r)
    TextView tvR;
    @BindView(R.id.ll_right)
    LinearLayout llRight;
    @BindView(R.id.rl_title_bg)
    RelativeLayout rlTitleBg;

    private List<CommonProblemBean> mBeanList = new ArrayList<>();


    @Override
    public void init() {
        tvTitle.setText("常见问题");

        mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
        for (int i = 0; i < 7; i++) {
            CommonProblemBean bean = new CommonProblemBean();
            bean.setContent("婚姻家庭相关法律法规；");
            mBeanList.add(bean);
        }
        CommonProblemAdapter mAdapter = new CommonProblemAdapter(mBeanList);
        mAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
//                startActivity(new Intent(CommonProblemActivity.this,ProblemDetailsActivity.class));
            }
        });
        mRecyclerView.setAdapter(mAdapter);
    }

    @Override
    public int setLayout() {
        return R.layout.activity_common_problem;
    }

    @Override
    public void initLoadStart() {

    }

    @Override
    public void initLoadEnd() {

    }

    @Override
    public void initBindingView(Object mBean) {

    }


    @OnClick({R.id.ll_back, R.id.ll_right})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.ll_back:
                finish();
                break;
            case R.id.ll_right:
                break;
        }
    }
}
